﻿@model  FCDB.Entity.ReportFieldSettings 
 @{
     ViewBag.Title = "EditUser";
     Layout = "~/Views/Shared/_POContentLayout.cshtml";
}
@using (Html.BeginForm("SaveFeildSetting", "BusinessReport", FormMethod.Post, new { id = "frm" }))
{   
    <div class="p15"> 
        <table class="tb-form">
            <thead>
                <tr>
                    <td colspan="5" class="aC"><input  type="hidden" id="hID" value="@Model.ID"/></td>
                </tr>
            </thead>
            <tr>
            <td>名称：<input type="text" class="input-style-txt form-input" id="txtName" name="Name" value="@Model.Name" />
                是否为默认：
                <select id="txtIsDefault" class="form-select" name="IsDefault">
                    <option @(Model.IsDefault == true ? "selected" : "") value="true">是</option>
                    <option @(Model.IsDefault != true ? "selected" : "") value="false">否</option>
                </select> 
                </td></tr>
            @{
                IList<String> list = new List<String>();  
                if ( !String.IsNullOrEmpty(Model.FieldContent))
                {
                    String[] fields = Model.FieldContent.Split(",".ToArray());
                    foreach (String item in fields)
                    {
                        if (!String.IsNullOrEmpty(item.Trim()))
                        {
                            list.Add(item);
                        }
                    }
                }
    <tr>


        <td>
            <input type="checkbox" @(list.Contains("CaseNumber") ? "checked='checked'" : "") class=" fields form-select" value="CaseNumber" />案号
            <input type="checkbox" @(list.Contains("ArbitrationNumber") ? "checked='checked'" : "") class="fields form-select" value="ArbitrationNumber" />仲裁案号
            <input type="checkbox" @(list.Contains("ApplyUser") ? "checked='checked'" : "") class="fields form-select" value="ApplyUser" />申请人
            <input type="checkbox" @(list.Contains("Respondent") ? "checked='checked'" : "") class="fields form-select" value="Respondent" /> 被申请人
            <input type="checkbox" @(list.Contains("ApplyGuarantee") ? "checked='checked'" : "") class="fields form-select" value="ApplyGuarantee" />申请人担保情况
            <input type="checkbox" @(list.Contains("Court") ? "checked='checked'" : "") class="fields form-select" value="Court" />所属法院
            <input type="checkbox" @(list.Contains("Amount") ? "checked='checked'" : "") class="fields form-select" value="Amount" />标的金额
            <input type="checkbox" @(list.Contains("pact_no") ? "checked='checked'" : "") class="fields form-select" value="pact_no" />协议保函编号
            <input type="checkbox" @(list.Contains("FormTitle") ? "checked='checked'" : "") class="fields form-select" value="FormTitle" />流程名称
        </td>
    </tr>
                <tr>

                    <td>
                        <input type="checkbox" @(list.Contains("Rate") ? "checked='checked'" : "") class="fields form-select" value="Rate" />费率
                        <input type="checkbox" @(list.Contains("ContractAmount") ? "checked='checked'" : "") class="fields form-select" value="ContractAmount" />合同收款
                        <input type="checkbox" @(list.Contains("PayableAmount") ? "checked='checked'" : "") class="fields form-select" value="PayableAmount" />应付佣金
                        <input type="checkbox" @(list.Contains("ActualRate") ? "checked='checked'" : "") class="fields form-select" value="ActualRate" />实际费率
                        <input type="checkbox" @(list.Contains("ActualCharge") ? "checked='checked'" : "") class="fields form-select" value="ActualCharge" />实际收费
                        <input type="checkbox" @(list.Contains("SalemanName") ? "checked='checked'" : "") class="fields form-select" value="SalemanName" />业务员
                        <input type="checkbox" @(list.Contains("DepartmentName") ? "checked='checked'" : "") class="fields form-select" value="DepartmentName" />所属部门
                        <input type="checkbox" @(list.Contains("GuaranteeSituation") ? "checked='checked'" : "") class="fields form-select" value="GuaranteeSituation" />联保情况
                        <input type="checkbox" @(list.Contains("ApplyAddress") ? "checked='checked'" : "") class="fields form-select" value="ApplyAddress" />申请人地址
                    </td>
                </tr>
                <tr>

                    <td> 
                        <input type="checkbox" @(list.Contains("ApplyIDCard") ? "checked='checked'" : "") class="fields form-select" value="ApplyIDCard" />申请人身份证或法证 
                        <input type="checkbox" @(list.Contains("CauseOfAction") ? "checked='checked'" : "") class="fields form-select" value="CauseOfAction" />案由
                        <input type="checkbox" @(list.Contains("Bond") ? "checked='checked'" : "") class="fields form-select" value="Bond" />保证金
                        <input type="checkbox" @(list.Contains("CompanyGuarantee") ? "checked='checked'" : "") class="fields form-select" value="CompanyGuarantee" />联保公司的担保人
                        <input type="checkbox" @(list.Contains("CompanyUser") ? "checked='checked'" : "") class="fields form-select" value="CompanyUser" />联保公司法定代表人
                        <input type="checkbox" @(list.Contains("CompanyAddress") ? "checked='checked'" : "") class="fields form-select" value="CompanyAddress" />联保公司地址
                        <input type="checkbox" @(list.Contains("CompanyTel") ? "checked='checked'" : "") class="fields form-select" value="CompanyTel" />联保公司联系电话
                    </td>
                </tr>
                <tr>

                    <td> 
                        <input type="checkbox" @(list.Contains("InsuranceCooperation") ? "checked='checked'" : "") class="fields form-select" value="InsuranceCooperation" />保险合作情况
                        <input type="checkbox" @(list.Contains("BusinessRemark") ? "checked='checked'" : "") class="fields form-select" value="BusinessRemark" />业务备注
                        <input type="checkbox" @(list.Contains("ChargingDate") ? "checked='checked'" : "") class="fields form-select" value="ChargingDate" />收费日期
                        <input type="checkbox" @(list.Contains("Intermediary") ? "checked='checked'" : "") class="fields form-select" value="Intermediary" />实付中介费
                        <input type="checkbox" @(list.Contains("RebateTime") ? "checked='checked'" : "") class="fields form-select" value="RebateTime" />实际返佣时
                        <input type="checkbox" @(list.Contains("GuaranteeTime") ? "checked='checked'" : "") class="fields form-select" value="GuaranteeTime" />保函生成时间
                        <input type="checkbox" @(list.Contains("ReceiptInfo") ? "checked='checked'" : "") class="fields form-select" value="ReceiptInfo" />收据开具情况
                        <input type="checkbox" @(list.Contains("FinanceRemark") ? "checked='checked'" : "") class="fields form-select" value="FinanceRemark" />财务备注
                      
                    </td>
                </tr>

                <tr> 
                    <td>
                       
                        <input type="checkbox" @(list.Contains("IsGetFile") ? "checked='checked'" : "") class="fields form-select" value="IsGetFile" />是否归档
                        <input type="checkbox" @(list.Contains("IsCharge") ? "checked='checked'" : "") class="fields form-select" value="IsCharge" />是否已收费
                        <input type="checkbox" @(list.Contains("Judge") ? "checked='checked'" : "") class="fields form-select" value="Judge" />主审法官
                        <input type="checkbox" @(list.Contains("AchievementTime") ? "checked='checked'" : "") class="fields form-select" value="AchievementTime" />业绩归属年月
                        <input type="checkbox" @(list.Contains("CaseStatus") ? "checked='checked'" : "") class="fields form-select" value="CaseStatus" />案件状态
                        <input type="checkbox" @(list.Contains("DataSend") ? "checked='checked'" : "") class="fields form-select" value="DataSend" />龙岗数据报送
                       

                    </td>
                </tr>  
                <tr>

                    <td>
                        <input type="checkbox" @(list.Contains("CommissionSend") ? "checked='checked'" : "") class="fields form-select" value="CommissionSend" />提成是否发放
                        <input type="checkbox" @(list.Contains("Quota") ? "checked='checked'" : "") class="fields form-select" value="Quota" />释放额度情况
                        <input type="checkbox" @(list.Contains("GeneralRemark") ? "checked='checked'" : "") class="fields form-select" value="GeneralRemark" />综合部备注
 
                        <input type="checkbox" @(list.Contains("CreateTime") ? "checked='checked'" : "") class="fields form-select" value="CreateTime" />创建日期
 
                        <input type="checkbox" @(list.Contains("financiaAmount") ? "checked='checked'" : "") class="fields form-select" value="financiaAmount" /> 财务实收金额
                    </td>

                </tr>
                <tr>
                    <td>
                        <input type="checkbox" @(list.Contains("CommissionApr") ? "checked='checked'" : "") class="fields form-select" value="CommissionApr" /> 提成金额
                        <input type="checkbox" @(list.Contains("GuaranteeType") ? "checked='checked'" : "") class="fields form-select" value="GuaranteeType" /> 保函类型
                        <input type="checkbox" @(list.Contains("AccountRemark") ? "checked='checked'" : "") class="fields form-select" value="AccountRemark" /> 会计备注
                        <input type="checkbox" @(list.Contains("CompanyName") ? "checked='checked'" : "") class="fields form-select" value="CompanyName" /> 公司名称
                        <input type="checkbox" @(list.Contains("Bank") ? "checked='checked'" : "") class="fields form-select" value="Bank" /> 开户银行
                        <input type="checkbox" @(list.Contains("AccountNo") ? "checked='checked'" : "") class="fields form-select" value="AccountNo" /> 账号
                        <input type="checkbox" @(list.Contains("Due") ? "checked='checked'" : "") class="fields form-select" value="Due" /> 申请金额
                        <input type="checkbox" @(list.Contains("PayCompany") ? "checked='checked'" : "") class="fields form-select" value="PayCompany" /> 归属公司 
                        </td>
                    </tr>
                <tr>
                    <td>
                        <input type="checkbox" @(list.Contains("Remark") ? "checked='checked'" : "") class="fields form-select" value="Remark" /> 备注
                        <input type="checkbox" @(list.Contains("Taxation") ? "checked='checked'" : "") class="fields form-select" value="Taxation" /> 应扣税费 
                        <input type="checkbox" @(list.Contains("PaidAmount") ? "checked='checked'" : "") class="fields form-select" value="PaidAmount" /> 实付中介费 
                        <input type="checkbox" @(list.Contains("SealStatus") ? "checked='checked'" : "") class="fields form-select" value="SealStatus" /> 是否确认盖章
                        <input type="checkbox" @(list.Contains("LBgongsi") ? "checked='checked'" : "") class="fields form-select" value="LBgongsi" /> 合作公司
                        <input type="checkbox" @(list.Contains("DBjine") ? "checked='checked'" : "") class="fields form-select" value="DBjine" /> 富昌担保标的
                        <input type="checkbox" @(list.Contains("XYfeiyong") ? "checked='checked'" : "") class="fields form-select" value="XYfeiyong" /> 富昌协议费用
                        <input type="checkbox" @(list.Contains("TSDBjine") ? "checked='checked'" : "") class="fields form-select" value="TSDBjine" /> 他司担保标的
                        <input type="checkbox" @(list.Contains("TSXYfeiyong") ? "checked=hecked'" : "") class="fields form-select" value="TSXYfeiyong" /> 他司协议费用
                    </td>
                </tr>
                  <tr>
                      <td>
                          <input type="checkbox" @(list.Contains("FYfeiyong") ? "checked='checked'" : "") class="fields form-select" value="FYfeiyong" /> 返佣费用
            <input type="checkbox" @(list.Contains("JLbaozhengjin") ? "checked='checked'" : "") class="fields form-select" value="JLbaozhengjin" /> 是否需要保证金
<input type="checkbox" @(list.Contains("BZJjine") ? "checked='checked'" : "") class="field'cs form-select" value="BZJjine" /> 富昌占总标的比例
                          <input type="checkbox" @(list.Contains("ZBjine") ? "checked='checked'" : "") class="fields form-select" value="ZBjine" /> 总标的金额
                          <input type="checkbox" @(list.Contains("ZBbili") ? "checked='checked'" : "") class="fields form-select" value="ZBbili" /> 占总标的比例  
                      </td>
                  </tr>
                <tr>
                    <td>
                        <input type="checkbox" @(list.Contains("FCSSfeiyong") ? "checked='checked'" : "") class="fields form-select" value="FCSSfeiyong" /> 富昌实收费用
                        <input type="checkbox" @(list.Contains("FCZbili") ? "checked='checked'" : "") class="fields form-select" value="FCZbili" /> 他司占总标的比例
                        <input type="checkbox" @(list.Contains("TSSHfeiyong") ? "checked='checked'" : "") class="fields form-select" value="TSSHfeiyong" /> 他司实收费用
                        <input type="checkbox" @(list.Contains("shouju") ? "checked='checked'" : "") class="fields form-select" value="shouju" /> 收据/发票
                        <input type="checkbox" @(list.Contains("suifei") ? "checked='checked'" : "") class="fields form-select" value="suifei" /> 税费
                    </td>
                </tr>
            }
            <tr>
                <td colspan="5" class="aC">
                    <input type="button" id="submit" value="确定" class="btn btn-blue" />
                    &nbsp;
                    <input type="button" value="关闭" onclick="onClose()" class="btn btn-blue" />
                </td> 
            </tr>
        </table>

    </div>
    <script type="text/javascript" src='@Url.Content("~/Scripts/jquery.form.js")'> </script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/lhgdialog.min.js")'> </script>  
    <script type="text/javascript">

        function onClose() {
            window.top.oDG.close();
        };
        $(function () { 
            $("#submit").click(function () {
                var strFields="";
                $(".form-select:checked").each(function()
                {
                    strFields=strFields+$(this).val()+",";
                });
                var options = {
                    data: {
                        id: $("#hID").val(),
                        name: $("#txtName").val(),
                        isDefault:$("#txtIsDefault option:selected").val(),
                        strFields: strFields
                    },
                    success: function (data) { 
                       window.top.refresh();
                       window.top.oDG.close(); 
                    }
                };
                $("#frm").ajaxSubmit(options);
            });
        })
    </script>

}

